import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';

const url = 'http://47.76.214.44:8088'//'http://47.106.204.192:8088'
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    },
  },
  base: './', // 如果部署到非根目录，请设置此选项
  server: {
    proxy: { // 如果需要代理API请求
      '/api': {
        target: url,
        ws: true,
        changeOrigin: true,
      },
      '/app': {
        target: url,
        ws: true,
        changeOrigin: true,
      },
    },
  },
})
